#!/bin/bash

echo "Testing login API..."
echo "Request: POST /api/auth/login"
echo "Body: {\"username\":\"admin\",\"password\":\"admin123\"}"
echo ""
echo "Response:"
curl -s -X POST http://localhost:8080/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"admin123"}' \
  | python3 -m json.tool

echo ""
echo "Testing with wrong password:"
echo "Response:"
curl -s -X POST http://localhost:8080/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"wrongpassword"}' \
  | python3 -m json.tool